<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        class parent {
            constructor(money, house) {
                this.money = money;
                this.house = house;

            }
            work() {
                console.log("挣钱");

            }
        }
        class Child extends parent{
            constructor(money1,house1){
                super(money1,house1)
            }
            play(){
                console.log("玩");
                
            }
        }
        let obj=new Child("1k","别墅");
        console.log(obj);
        let fn=(...rest)=>{
            console.log(...rest);
            
        }
        fn("a","b")
    </script>
</body>

</html>